for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
// RuntimeException.js
"use strict";
// :: DEPENDENCIES
// load native dependencies
const path = require("path");
// load local dependencies
const Exception = require(path.join(__dirname, "Exception.js"));
// :: BASIC SETUP
/**
* The <tt>RuntimeException</tt> class is the superclass of those exceptions that can be thrown during the normal operation.
* @param {String} name - The name of the <tt>RuntimeException</tt>.
* @param {String} message - The message describing the <tt>RuntimeException</tt>.
* @param {Number} code - The unique code that identifies the cause of the <tt>RuntimeException</tt>.
* @augments Exception
* @constructor
* @see https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html
*/
const RuntimeException = function (name, message, code) {
Exception.call(this, name, message, code);
};
// :: INHERITANCE
// set the prototype chain parent to the Exception 'class'
RuntimeException.prototype = Object.create(Exception.prototype);
// set the prototype chain constructor
RuntimeException.prototype.constructor = Exception;
// :: PROTOTYPE
* The name used to identify a <tt>RuntimeException</tt>.
* @type {String}
* @default
RuntimeException.prototype.name = "RuntimeException";
// :: EXPORT
// export the RuntimeException 'class'
module.exports = RuntimeException;